package cn.edu.scau.cmi.wangshuhong.singleton;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.event.*;
public class MultiPletonController {

    @FXML
    private TextArea output;

    @FXML
    private TextField input;

    @FXML
    private Button create;

    @FXML
    void Create(ActionEvent event) {
    	String name=input.getText();
    	MultiPleton.create(name);
    	for(int i=0;i<MultiPleton.no;i++){
    		output.appendText(MultiPleton.getInstance(i).getName());
    		
    	}
    	output.appendText("\n");
    }

}
